package br.idez.idezJet.integracao.interceptor;

import java.io.Serializable;

import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;


public class LogInterceptor implements Serializable{
	
	 
	@AroundInvoke
	public Object metodoInterceptador (InvocationContext ic) throws Exception{		
		System.out.println("antes de Chamar o metodo " + ic.getMethod());
		Object o = ic.proceed();
		System.out.println("Depois de Chamar o metodo " +  ic.getMethod());	
		GravadorDeLog gl = new GravadorDeLog();
		gl.gravarLog(o);
		return o;
	}
	
	

	
}
